Shifters are often used in digital signal processors and general-purpose processors to shift or rotate data in applications including arithmetic operations, variable-length coding, bit-indexing, etc. Shifting and rotating operations performed by a shifter may include, for example, shift right arithmetic, shift left arithmetic, shift right logical, shift left logical, rotate right, and rotate left to shift and/or rotate input data or operands. A shifter performs a shifting or rotating operation by a certain amount (a shift amount or rotate amount) on input data. A shifter is often implemented with a series of multiplexers grouped according to the levels of shift operations. A shift (or rotate) amount for an n-bit input includes a log2(n)-bit integer that represents values from 0 to n−1, and each bit in the shift (or rotate) amount controls a different stage of the shifter. The data into the m-th stage controlled by, for example, a shift amount b(m) is shifted by 2m bits if the bit value b(m) is one (1); otherwise, the data is not shifted.
SIMD (Single Instruction Multiple Data) describes a class of computers with multiple processing elements performing the same operation on multiple data points simultaneously and is often utilized in data level parallelism. Conventional synthesis electronic design automation (EDA) tools are generally tuned or configured for single operation and thus cannot combine different widths of shifters (e.g., SIMD type or Single Instruction Multiple Data types having 8-16-20-32-40-64-80-bit widths) into a single block of circuitry receiving inputs from, for example, the register file or instruction pipelines and transmitting output to, for example, ALU or arithmetic logic unit. In addition, modern EDA tools, when used to implement the shifter design, also encounter great difficulties in meeting the timing requirements and often result in a shifter design having a significant larger die area and failing to run at high frequencies (e.g., failure to run in the Giga-Hertz range).
Therefore, there exist a need for a universal shifter that performs both the shift and rotate operations with one or more amounts (e.g., one or more of 1-2-4-8-16-32-64-bit shift amounts) for input data or input operands (collectively “input data”) having multiple data types or partition types (e.g., 8-16-32-64-20-40-80-bits) producing multiple outputs according to data types, in the Giga-Hertz range in a single circuit block while reducing or minimizing the die area for the single circuit block.